﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OracleClient;
using System.Configuration;
using System.Data;

namespace BSC_OTC_THONGBAO
{
    public class Connect
    {
        #region khai bao bien
        string _connectstring = ConfigurationManager.AppSettings["ConnectString"].ToString();
        public OracleDataAdapter _da = new OracleDataAdapter();
        public OracleCommand _cmd = new OracleCommand();
        OracleConnection _con = new OracleConnection();
        #endregion

        #region ham connect

        public void OpenConnect()
        {
            if (_con.State != ConnectionState.Open)
            {
                _con.ConnectionString = _connectstring;
                _con.Open();
                _cmd.Connection = _con;
            }
        }

        public void CloseConnect()
        {
            _con.Close();
        }


        #endregion
    }
}

